﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using QLTV.DAL;
using QLTV.Public;

namespace QLTV.BLL
{
    public class PhieuSachBLL
    {
        PhieuSachDAL psDAL;
        public PhieuSachBLL()
        {
            psDAL = new PhieuSachDAL();
        }
        public DataTable LoadSach_ThemSach(SachDTO p)
        {
            try
            {
                return psDAL.LoadSach_ThemSach(p);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }

        public DataTable LoadSach_TimSach(DauSachDTO p)
        {
            try
            {
                return psDAL.LoadSach_TimSach(p);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }

        public DataTable PhieuMuonSach_ThemSach_MaSach(SachDTO p)
        {
            try
            {
                return psDAL.PhieuMuonSach_ThemSach_MaSach(p);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }

        public DataTable PhieuMuonSach_TimSach_MaDS(DauSachDTO p)
        {
            try
            {
                return psDAL.PhieuMuonSach_TimSach_MaDS(p);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }

        public DataTable PhieuMuonSach_TimSach_TenDS(DauSachDTO p)
        {
            try
            {
                return psDAL.PhieuMuonSach_TimSach_TenDS(p);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }

        public DataTable PhieuTraSach_TimDocGia_MaDG(DocGiaDTO p)
        {
            try
            {
                return psDAL.PhieuTraSach_TimDocGia_MaDG(p);
            }
            catch (SqlException ex)
            {
                throw ex;
            }
        }
        public int ChoMuonSach(PhieuSachDTO p)
        {
            try
            {
                return psDAL.ChoMuonSach(p);
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }
        public DataTable PhieuTraSach_TimPhieuSach_MaDG(PhieuSachDTO ps)
        {
            try
            {
                return psDAL.PhieuTraSach_TimPhieuSach_MaDG(ps);
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }

        public DataTable PhieuMuonSach_KiemTraDaTra_MaDG(PhieuSachDTO p)
        {
            try
            {
                return psDAL.PhieuMuonSach_KiemTraDaTra_MaDG(p);
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }
        public DataTable PhieuTraSach_HienSachTra_MaDG(PhieuSachDTO p)
        {
            try
            {
                return psDAL.PhieuTraSach_HienSachTra_MaDG(p);
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }

        public int NhanTraSach(PhieuSachDTO p)
        {
            try
            {
                return psDAL.NhanTraSach(p);
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }

        public DataTable QuanLyMuonTra_LoadPhieuSachChuaTra()
        {
            try
            {
                return psDAL.QuanLyMuonTra_LoadPhieuSachChuaTra();
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }
        public DataTable QuanLyMuonTra_LoadSachChuaTra()
        {
            try
            {
                return psDAL.QuanLyMuonTra_LoadSachChuaTra();
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }

        public DataTable LoadPhieuSachQuaHan()
        {
            try
            {
                return psDAL.LoadPhieuSachQuaHan();
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }

        public DataTable QuanLyMuonTra_LoadSachDaTra()
        {
            try
            {
                return psDAL.QuanLyMuonTra_LoadSachDaTra();
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }

        public DataTable QuanLyMuonTra_LoadPhieuSachDaTra()
        {
            try
            {
                return psDAL.QuanLyMuonTra_LoadPhieuSachDaTra();
            }
            catch (SqlException ex)
            {

                throw ex;
            }
        }
    }
}
